home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor2 / stocdist.src < prev    next >
Text File  |  1992-01-11  |  2KB  |  59 lines

  1. %%HP: T(3)A(D)F(.);
  2. @ STOCDIST by Luca Radice
  3.     DIR
  4.       @ You must enter SigmaDAT before calculation.
  5.       \GSDAT 0
  6.       KMO
  7.       @ Computes the k-th moment about the origin. 
  8.         \<< \-> k
  9.           \<< \GSDAT OBJ\-> DROP k ^ 1 N\GS 1 -
  10.             START SWAP k ^ +
  11.             NEXT N\GS /
  12.           \>>
  13.         \>>
  14.       KMM
  15.       @ Computes the k-th moment about the mean.
  16.         \<< \-> k
  17.           \<< \GSDAT OBJ\-> DROP MEAN - k ^ 1 N\GS 1 -
  18.             START SWAP MEAN - k ^ +
  19.             NEXT N\GS /
  20.           \>>
  21.         \>>
  22.       @ Computes the standard deviation. 
  23.       Sdev
  24.         \<< 2 KMM \v/ \>>
  25.       @ Computes the Skewness index.
  26.       SKEW
  27.         \<< 3 KMM Sdev 3 ^ /
  28.           "\Gmc\179=E{X\179}+2\Gm\179-3\GmE{X\178}"
  29.           \->TAG
  30.         \>>
  31.       @ Computes the Curtosi index.
  32.       CURT
  33.         \<< 4 KMM 2 KMM SQ / \>>
  34.       @ For a given class number computes the frequencies for
  35.       @ each class boundary. As min value for BINS use MINSigma
  36.       @ and as value for boundary range use 
  37.       @ (MAXSigma-MINSigma)/(Number of class).
  38.       NCLASS
  39.         \<< \-> CL
  40.           \<< MAX\GS MIN\GS - CL / \-> DCL
  41.             \<< MIN\GS DCL CL BINS DROP
  42.               ARRY\-> DROP { 1 CL } \->ARRY DUP DUP SIZE
  43.               N\GS CON ADIVB { \GSPAR } PURGE
  44.             \>>
  45.           \>>
  46.         \>>
  47.       @ Divide each element of an array a for each element of a
  48.       @ same dimension array b. (Used from NCLASS)
  49.       ADIVB
  50.         \<< \-> TMP
  51.           \<< ARRY\-> LIST\-> DROP \-> I
  52.             \<< I
  53.               FOR K I ROLL TMP { 1 K } GET /
  54.               NEXT { 1 I } \->ARRY
  55.             \>>
  56.           \>>
  57.         \>>
  58.     END
  59.